package com.lengmomo.games.myutil;

import com.lengmomo.games.pojo.po.User;
import org.apache.shiro.SecurityUtils;

/**
 * @author: lengmomo
 * @create: 2021/9/15
 **/
public class ShiroUtil {
    /**
     * 得到当前登录的用户
     *
     * @return
     */
    public static User getLoginUser() {
        return (User) SecurityUtils.getSubject().getPrincipal();
    }
}
